package org.vnl.platform.orm;

import java.sql.Types;

/**
 * 定義DB與物件間類別轉換之型態
 * @author Vaughan
 *
 */
public enum ORMTypes {

    STRING_CHAR(Types.CHAR),
    STRING_VARCHAR(Types.VARCHAR),
    BOOLEAN_CHAR(Types.CHAR),
    BOOLEAN_SMALLINT(Types.SMALLINT),
    INTEGER_SMALLINT(Types.SMALLINT),
    INTEGER_INTEGER(Types.INTEGER),
    INTEGER_NUMBER(Types.NUMERIC),
    DOUBLE_FLOAT(Types.FLOAT),
    DOUBLE_DOUBLE(Types.DOUBLE),
    DOUBLE_NUMBER(Types.NUMERIC),
    DOUBLE_DECIMAL(Types.DECIMAL),
    BIGINTEGER_INTEGER(Types.INTEGER),
    BIGDECIMAL_FLOAT(Types.FLOAT),
    BIGDECIMAL_DOUBLE(Types.DOUBLE),
    BIGDECIMAL_NUMBER(Types.NUMERIC),
    BIGDECIMAL_DECIMAL(Types.DECIMAL);
    
    private int type;
    
    ORMTypes(int type) {
        this.setType(type);
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }
    
    
}
